

package padraostrategy;


public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Context context;

        context = new Context(new ConcreteStrategyAdd());
        float resultA = context.executeStrategy(3,4);

        context = new Context(new ConcreteStrategySubtract());
        float resultB = context.executeStrategy(3,4);

        context = new Context(new ConcreteStrategyMultiply());
        float resultC = context.executeStrategy(3,4);

        System.out.println("Resultado A: "+resultA);
        System.out.println("Resultado B: "+resultB);
        System.out.println("Resultado C: "+resultC);
    }

}
